import request from '@/utils/request'
const baseUrl = '/api/job-responsibility'
// 获取职责书列表
export function getZerenshuList(params) {
    return request({
        url: `${baseUrl}/list`,
        method: 'get',
        params
    })
}

// 获取职责书详情
export function getZerenshuDetail(id) {
    return request({
        url: `${baseUrl}/view/${id}`,
        method: 'get'
    })
}

// 创建职责书
export function createZerenshu(data) {
    return request({
        url: `${baseUrl}/save`,
        method: 'post',
        data
    })
}

// 更新职责书
export function updateZerenshu(id, data) {
    return request({
        url: `${baseUrl}/update/${id}`,
        method: 'put',
        data
    })
}

// 删除职责书
export function deleteZerenshu(id) {
    return request({
        url: `${baseUrl}/${id}`,
        method: 'delete'
    })
} 